
// The Ambiguity of Fishing for Fun, October 2022
// This file creates the violin plots (Figures A-4 through A-7)

import excel dataGraphs.xls, firstrow case(lower) clear
replace model="{&alpha}-MEU" if model=="ambiguity"
replace model="clogit" if model=="linear"
replace model="mlogit" if model=="mixed"

//Landings 
*Figure A-4
vioplot predf10, over(model) name(plot12, replace) title("Y2010",size(10pt)) ytitle(Fish (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(3511.546, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predf11, over(model) name(plot13, replace) title("Y2011",size(10pt)) ytitle(Fish (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(4326.867, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predf12, over(model) name(plot14, replace) title("Y2012",size(10pt)) ytitle(Fish (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(5737.045, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white)

vioplot predf13, over(model) name(plot15, replace) title("Y2013",size(10pt)) ytitle(Fish (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(6600.546, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predf14, over(model) name(plot16, replace) title("Y2014",size(10pt)) ytitle(Fish (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(5364.891, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predf15, over(model) name(plot17, replace) title("Y2015",size(10pt)) ytitle(Fish (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(3500(500)6000,labsize(vsmall)) yline(4034.036, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

gr combine plot12 plot13 plot14 plot15 plot16 plot17, scheme(s1mono)
graph export FigureA4.eps, replace


*Figure A-5
vioplot predf16, over(model) name(plot18, replace) title("Y2016",size(10pt)) ytitle(Fish (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(4301.669, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predf17, over(model) name(plot19, replace) title("Y2017",size(10pt)) ytitle(Fish (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(3174.95, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predf18, over(model) name(plot20, replace) title("Y2018",size(10pt)) ytitle(Fish (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(2412.514, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white)

vioplot predf19, over(model) name(plot21, replace) title("Y2019",size(10pt)) ytitle(Fish (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(2383.228, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predf20, over(model) name(plot22, replace) title("Y2020",size(10pt)) ytitle(Fish (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(2200(400)3800,labsize(vsmall)) yline(3494.607, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 
 
gr combine plot18 plot19 plot20, name("firstset_fish", replace) scheme(s1mono)  cols(3)
gr combine plot21 plot22, name("secondset_fish", replace) scheme(s1mono) cols(2)
gr combine firstset_fish secondset_fish, scheme(s1mono) cols(1) 
graph export FigureA5.eps, replace


//Trips
*Figure A-6
vioplot predt10, over(model) name(plot1, replace) title("Y2010",size(10pt)) ytitle(Trips (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(13600(400)15000,labsize(vsmall)) yline(14881.7, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predt11, over(model) name(plot2, replace) title("Y2011",size(10pt)) ytitle(Trips (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(15433.44, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predt12, over(model) name(plot3, replace) title("Y2012",size(10pt)) ytitle(Trips (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(14000(500)16500,labsize(vsmall)) yline(14470.3, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white)

vioplot predt13, over(model) name(plot4, replace) title("Y2013",size(10pt)) ytitle(Trips (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(14401.54, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predt14, over(model) name(plot5, replace) title("Y2014",size(10pt)) ytitle(Trips (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(14297.84, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predt15, over(model) name(plot6, replace) title("Y2015",size(10pt)) ytitle(Trips (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(12600(400)14600,labsize(vsmall)) yline(12751.63, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

gr combine plot1 plot2 plot3 plot4 plot5 plot6, scheme(s1mono)
graph export FigureA6.eps, replace


*Figure A-7
vioplot predt16, over(model) name(plot7, replace) title("Y2016",size(10pt)) ytitle(Trips (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(12100.22, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predt17, over(model) name(plot8, replace) title("Y2017",size(10pt)) ytitle(Trips (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(10000(1000)13000,labsize(vsmall)) yline(10562.86, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white) 

vioplot predt18, over(model) name(plot9, replace) title("Y2018",size(10pt)) ytitle(Trips (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(,labsize(vsmall)) yline(10370.79, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white)

vioplot predt19, over(model) name(plot10, replace) title("Y2019",size(10pt)) ytitle(Trips (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(9800(400)11000,labsize(vsmall)) yline(10802.01, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white)
 
vioplot predt20, over(model) name(plot11, replace) title("Y2020",size(10pt)) ytitle(Trips (thousands),size(8pt)) ylab(,angle(0)) xlabel(,labsize(vsmall)) ylabel(10000(800)13200,labsize(vsmall)) yline(13049.96, lpattern(dash) lwidth(1.35pt)) scheme(s2mono) graphregion(color(white)) bgcolor(white)  

gr combine plot7 plot8 plot9, name("firstset", replace) scheme(s1mono) cols(3)
gr combine plot10 plot11, name("secondset", replace) scheme(s1mono) cols(2)
gr combine firstset secondset, scheme(s1mono) cols(1) 
graph export FigureA7.eps, replace
